import "./assets/main.css";

import { createApp } from "vue";
import { createPinia } from "pinia";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import App from "./App.vue";
import router from "./router";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import WangCalendar from "wang-calendar";
import "wang-calendar/style.css";
import "@fontsource/fira-code/400.css";
import "@fontsource/fira-code/600.css";

const app = createApp(App);



app.use(ElementPlus, {
  locale: zhCn,
});
// // 初始化时恢复路由
// const initDynamicRoutes = () => {
//   const cachedRoutes = localStorage.getItem("cachedRoutes");
//   if (cachedRoutes) {
//     addDynamicRoutes(JSON.parse(cachedRoutes));
//   }
// };

// initDynamicRoutes();
//app.use(WangCalendar);
app.use(createPinia());
app.use(router);

app.mount("#app");
